libelf-loader: introduce elf_load_image
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 23 Jan 2012 09:42:12 +0000 (09:42 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 23 Jan 2012 09:42:12 +0000 (09:42 +0000)
commit079ff2d32c3db5a45cdbc8fb05be279544bdc111
tree8670aba405b6fd42651dcf6f17f42164945f2e62
parent7b8c36701d267971f189b435362bce8ff2266e79
libelf-loader: introduce elf_load_image

Implement a new function, called elf_load_image, to perform the
actually copy of the elf image and clearing the padding.  The function
is implemented as memcpy and memset when the library is built as part
of the tools, but it is implemented as raw_copy_to_guest and
raw_clear_guest when built as part of Xen, so that it can be safely
called with an HVM style dom0.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
tools/libxc/xc_dom_elfloader.c
tools/libxc/xc_hvm_build.c
xen/arch/x86/domain_build.c
xen/common/libelf/libelf-loader.c
xen/include/xen/libelf.h